<template>
  <div>
    我是轮播图
    <button @click="vuexBtn">vuex获取数据</button>
  </div>
</template>

<script>
import { mapGetters } from 'vuex'
export default {
  name: 'Brand',
  mounted () {
    this.getInfo()
  },
  methods: {
    getInfo () {
      this.$store.dispatch('home/getCategoryList')
    },
    vuexBtn () {
      console.log(this.firstPersonName)
      console.log(this.$store.state.home.goodsList)
    }
  },
  computed: {
    ...mapGetters('home', ['firstPersonName'])
  }
}
</script>

<style lang="less" scoped>
div{
    height: 50px;
    background: skyblue;
}
</style>
